package af.Action;

import java.util.ArrayList;
import java.util.HashMap;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

import af.Class.Informe;
import af.Class.Responsable;
import af.Form.GenInformeForm;
import af.Form.InformeForm;

public class InformeAction extends DispatchAction{
	  public ActionForward InformeAF(ActionMapping mapping, ActionForm form,
	            HttpServletRequest request, HttpServletResponse response)
	            throws Exception {
		  
		  	Informe Inf = new Informe();
	       
	        request.setAttribute( "respCombo", Inf.RespCombo());
	        request.setAttribute( "ubiCombo", Inf.UbiCombo());
	        request.setAttribute( "mesCombo", Inf.MesCombo());
	        request.setAttribute( "anoCombo", Inf.AnoCombo());
	       
	      	return mapping.findForward("ok");
		  
		  
		  
		  
	  }
	  public ActionForward GenInformeAF(ActionMapping mapping, ActionForm form,
	            HttpServletRequest request, HttpServletResponse response)
	            throws Exception {
		  
		  	Informe inf = new Informe();
	        //HttpSession session = request.getSession();

	        InformeForm frm =  (InformeForm) form;
	        request.getSession().setAttribute("grInforme", inf.ListaInforme(frm));
	        
	        return mapping.findForward("listar");
	  }
}
